﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using DTO;
using DAO;
using System.Data;
using System.Data.OleDb;

namespace BUS
{
    public class PhongBUS
    {
        public DataTable LoadDanhSachPhongBUS()
        {
            PhongDAO dao = new PhongDAO();
            return dao.LoadDanhSachPhongDAO();
            
            
        }
        public DataRow LayThongTinPhongBUS(int id)
        {
            PhongDAO dao = new PhongDAO();
            DataRow row = dao.LayThongTinPhong(id).Rows[0];
            return row;
        }
        public void UpdatTinhTrangPhong(int maphong,int tinhtrang)
        {
            PhongDAO dao = new PhongDAO();
            dao.UpdateTinhTrangPhong(maphong,tinhtrang);
        }
        public DataTable LayThongTinPhong(PhongDTO dto)
        {
            PhongDAO dao = new PhongDAO();
            return dao.LayThongTinPhong(dto.Maphong);
        }
        public DataTable LayDanhSachPhongTheoTinhTrang(int tinhtrang)
        {
            PhongDAO dao = new PhongDAO();
            return dao.LoadDanhSachPhongTheoTinhTrang(tinhtrang);
        }
       
    }
}
